<%@ page import="Model.SportBean" %>
<%@ page import="Model.Sport" %>
<%@ page import="java.util.ArrayList" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<% application.setAttribute("path",request.getContextPath());%>

<jsp:useBean id="sportBean" class="Model.SportBean" scope="session"/>
<html>
<%
  String name = (String) session.getAttribute("name");
%>
<head>
  <title>所有运动项目</title>
  <%--<link type="text/css" rel="stylesheet" href="../bootstrap/bootstrap.min.css">--%>
  <script type="text/javascript" src="../bootstrap/bootstrap.min.js"></script>
  <link rel="stylesheet" href="../css/index.css" type="text/css">
  <style>
    #page_nav{
      position: absolute;
      left: 480px;
      top: 570px;
      font-size: 20px;
    }
    .input{
      position: absolute;
      left: 1330px;
      top: 560px;
    }
    #page_nav a{
      color: blue;
    }
    #page_nav a:hover{
      color: red;
    }
    #page_nav{
      margin-left: 160px;
      margin-top: 25px;
    }
    .tail{
      position: absolute;
      font-size: 18px;
      left: 410px;
      top: 670px;
    }
  </style>
</head>
<body>
<div>

  <div class="head">
    <div class="headOne">
      <p id="system">运动会管理系统</p>
    </div>

    <div class="headThree">
      <div class="info" style="margin-top: 10px">
        <%--                <img src="../image/样式.png" alt="图片加载失败！">--%>
      </div>

      <div class="manager">
        <div id="manager_one">
          <img src="../image2/管理员.png" alt="图片加载失败" width="30px">
        </div>
        <div id="manager_two">
          <div style="font-size: 20px;color:white;"><%=name%></div>
        </div>
      </div>

      <div class="quit">
        <a class="quit" href="../jsp/login.jsp">☛退 出 登 录</a>
      </div>
    </div>
  </div>
  <div class="body_one">
    <div class="function1">
      🚀功能菜单
    </div>
    <div class="operating">
      <img src="../image/搜索.png" alt="加载失败" width="25px">&nbsp;&nbsp;<span><a href="../ZhiyuanzheLookSport">查看运动项目</a></span><br><br>
      <br>
      <br>
      <img src="../image/搜索.png" alt="加载失败" width="25px">&nbsp;&nbsp;<span><a href="SignUp2.jsp">报名</a></span><br><br>
      <img src="../image2/比例.png" alt="加载失败">&nbsp;<span><a href="../LookService">查看我的报名</a></span><br><br>
    </div>
  </div>
  <div class="body_two">
    <div class="body_head">
      <div class="home">
        <a href="zhiyuanzhe_index.jsp"><img src="../image/主页.png" alt="图片加载失败！"></a>
      </div>
      <div class="drop">
        <img src="../image2/下拉条.png" alt="图片加载失败！">
      </div>
    </div>

    <div class="body_tail">
      <div align="center" style="color: dodgerblue;font-size: 40px;margin-top: 10px">
        全部运动项目
      </div>


      <div>
        <table class="table table-hover" style="width: 1100px;margin-top: 30px;font-size: 20px" align="center">
          <thead>
          <tr>
            <th>编号</th>
            <th>名称</th>
            <th>时间</th>
            <th>地点</th>
            <th>详细信息</th>
          </tr>
          </thead>
          <tbody align="center">
            <%
              SportBean db=(SportBean) session.getAttribute("sportBean");
              ArrayList<Sport> d;
              d = db.getSports();

              for(int i=0;i<d.size();i++){
                out.print("<tr>");
                out.print("<td>"+d.get(i).getSno()+"</td>");
                out.print("<td>"+d.get(i).getSname()+"</td>");
                out.print("<td>"+d.get(i).getStime()+"</td>");
                out.print("<td>"+d.get(i).getSplace()+"</td>");
                out.print("<form action=\"sport_detail.jsp\" method=\"get\">");
                out.print("<td><input type="+"submit name="+"look value="+"详细信息"+"></td>");
                out.print("<td><input type="+"hidden name="+"num value="+i+"></td>");
                out.print("</form> </tr>");
              }
            %>
          </tbody>
        </table>
      </div>

      <div class="tail">
        河南工业大学
      </div>
    </div>
  </div>
</div>

</body>
</html>
